package office.action.hr.form;

import java.util.Map;

import office.bo.hr.impl.Officesupplies;
import platform.common.bo.IIdentifiableObj;

public class OfficesuppliesForm {

	private String id;
	private String name;			//名称
	private String description;		//描述
	private String sort;			//类别
	private String code;			//编号
	private String uint;			//单位
	private double uintPrice;		//单价
	private double repertory;		//当前库存
	private double protectionRepertory;	//警戒库存
	
	public IIdentifiableObj copyPropertiesToBO(IIdentifiableObj newObj) {
		Officesupplies bo = (Officesupplies)newObj;
		bo.setId(this.id);
		bo.setName(name);
		bo.setDescription(description);
		bo.setCode(code);
		bo.setUint(uint);
		bo.setUintPrice(uintPrice);
		bo.setRepertory(repertory);
		bo.setSort(sort);
		bo.setProtectionRepertory(protectionRepertory);
		return bo;
	}
	@SuppressWarnings("unchecked")
	public void copyPropertiesFromBO(IIdentifiableObj baseBO,Map map) {
		Officesupplies bo = (Officesupplies)baseBO;
		this.id = bo.getId().toString();
		this.name = bo.getName();
		this.description = bo.getDescription();
		if(null!=bo.getSort() && !("").equals(bo.getSort())){
			if(map.containsKey(bo.getSort())){
				this.sort = (String)map.get(bo.getSort());
			}
		}
		this.code = bo.getCode();
		this.uint = bo.getUint();
		this.uintPrice = bo.getUintPrice();
		this.repertory = bo.getRepertory();
		this.protectionRepertory = bo.getProtectionRepertory();
		
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getUint() {
		return uint;
	}
	public void setUint(String uint) {
		this.uint = uint;
	}
	public double getUintPrice() {
		return uintPrice;
	}
	public void setUintPrice(double uintPrice) {
		this.uintPrice = uintPrice;
	}
	public double getRepertory() {
		return repertory;
	}
	public void setRepertory(double repertory) {
		this.repertory = repertory;
	}
	public double getProtectionRepertory() {
		return protectionRepertory;
	}
	public void setProtectionRepertory(double protectionRepertory) {
		this.protectionRepertory = protectionRepertory;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
}
